/*
* Copyright (C) 2006 Jordi Marquès Ferré
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file DUROTY.txt.
*
* Author: Jordi Marquès Ferré
* c/Mallorca 295 principal B 08037 Barcelona Spain
* Phone: +34 625397324
*/


package com.duroty.hibernate;


// Generated 14-sep-2006 11:28:32 by Hibernate Tools 3.1.0.beta5

/**
 * ConColiId generated by hbm2java
 */
public class ConColiId implements java.io.Serializable {
    // Fields    

    /**
     *
     */
    private static final long serialVersionUID = -3902908394847497085L;

    /**
     * DOCUMENT ME!
     */
    private Contact contact;

    /**
     * DOCUMENT ME!
     */
    private ContactList contactList;

    // Constructors

    /** default constructor */
    public ConColiId() {
    }

    /** full constructor */
    public ConColiId(Contact contact, ContactList contactList) {
        this.contact = contact;
        this.contactList = contactList;
    }

    // Property accessors
    public Contact getContact() {
        return this.contact;
    }

    /**
     * DOCUMENT ME!
     *
     * @param contact DOCUMENT ME!
     */
    public void setContact(Contact contact) {
        this.contact = contact;
    }

    /**
     * DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public ContactList getContactList() {
        return this.contactList;
    }

    /**
     * DOCUMENT ME!
     *
     * @param contactList DOCUMENT ME!
     */
    public void setContactList(ContactList contactList) {
        this.contactList = contactList;
    }

    /**
     * DOCUMENT ME!
     *
     * @param other DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public boolean equals(Object other) {
        if ((this == other)) {
            return true;
        }

        if ((other == null)) {
            return false;
        }

        if (!(other instanceof ConColiId)) {
            return false;
        }

        ConColiId castOther = (ConColiId) other;

        return ((this.getContact() == castOther.getContact()) ||
        ((this.getContact() != null) && (castOther.getContact() != null) &&
        this.getContact().equals(castOther.getContact()))) &&
        ((this.getContactList() == castOther.getContactList()) ||
        ((this.getContactList() != null) &&
        (castOther.getContactList() != null) &&
        this.getContactList().equals(castOther.getContactList())));
    }

    /**
     * DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public int hashCode() {
        int result = 17;

        result = (37 * result) +
            ((getContact() == null) ? 0 : this.getContact().hashCode());
        result = (37 * result) +
            ((getContactList() == null) ? 0 : this.getContactList().hashCode());

        return result;
    }
}
